<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCompanyHonorDisgracesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('company_honor_disgraces', function (Blueprint $table) {
            $table->id();
            $table->string('company_name')->nullable()->comment('企业名称');
            $table->string('social_credit_code')->nullable()->comment('统一社会信用代码');
            $table->integer('decision_time')->comment('决定时间 时间戳');
            $table->integer('push_time')->comment('发布时间 时间戳');
            $table->string('document_number')->nullable()->comment('文书号');
            $table->string('organization')->comment('行政机关');
            $table->text('content');
            $table->tinyInteger('type')->default(0)->comment('1 荣榜 2 辱榜');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('company_honor_disgraces');
    }
}
